<?php 
namespace app\pay\model;
use think\Model;
use think\Db;
class Order extends Model
{
    public function check_order($ordernum="")
    {
        if($ordernum){
            $data = Db::table('game_rechlog')
                ->field('_userod')
                ->where('_userod', '=', $ordernum)
                ->count();
            if($data>0){
                return true;// 订单已存在
            }
        }
        return false;
    }
}